export class MjPrefab {

    public static Color_Type = {
        None:0,
        Wan: 1,   //万
        tiao: 2, //条
        tong: 3, //同
        fan: 4 //番
    }

        //麻将定义
    // 17,18,19, 20,21,22, 23,24,25
    // 33,34,35, 36,37,38, 39,40,41
    // 49,50,51, 52,53,54, 55,56,57
    // 65,66,67,68,  69,70,71
    //  0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,      //万子
    //  0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,      //索子
    //  0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,      //同子
    //  0x41, 0x42, 0x43, 0x44,  0x45, 0x46, 0x47,          //番子(东南西北 中发白)
    //  //0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58       //花(梅兰竹菊春夏秋冬)


    // 获取poker的值，1，2，3，4，5，6，7，8，9，a,b,c,d
    public static getValue(pokerData: number): number {
        if (isNaN(pokerData)) {
            pokerData = 0
        }
        return pokerData & 0x0f;
    }


    //获取poker花色 0,1,2,3,4
    public static getColor(pokerData: number): number {
        if (isNaN(pokerData)) {
            pokerData = 0
        }
        return (pokerData & 0xF0) >> 4;
    }


}